package com.iot.device.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.iot.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.iot.common.core.domain.BaseEntity;

/**
 * 震动监测预警事件对象 t_quake_event
 * 
 * @author iot
 * @date 2023-04-14
 */
public class QuakeEvent extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    public static class Position extends QuakeEvent {
        private float x;
        private float y;
        private float z;

        public Position() {
        }

        public Position(float x, float y, float z) {
            this.x = x;
            this.y = y;
            this.z = z;
        }

        public float getX() {
            return x;
        }
        public void setX(float x) {
            this.x = x;
        }
        public float getY() {
            return y;
        }
        public void setY(float y) {
            this.y = y;
        }
        public float getZ() {
            return z;
        }
        public void setZ(float z) {
            this.z = z;
        }
    }
    public static class Angle extends QuakeEvent {
        private float x;
        private float y;
        private float z;

        public Angle() {
        }

        public Angle(float x, float y, float z) {
            this.x = x;
            this.y = y;
            this.z = z;
        }

        public float getX() {
            return x;
        }

        public void setX(float x) {
            this.x = x;
        }

        public float getY() {
            return y;
        }

        public void setY(float y) {
            this.y = y;
        }

        public float getZ() {
            return z;
        }

        public void setZ(float z) {
            this.z = z;
        }
    }
    public static class Ii extends QuakeEvent {
        private float value;

        public Ii() {
        }

        public Ii(float value) {
            this.value = value;
        }

        public float getValue() {
            return value;
        }

        public void setValue(float value) {
            this.value = value;
        }
    }

    private QuakeClient client;

    public QuakeClient getClient() {
        return client;
    }

    public void setClient(QuakeClient client) {
        this.client = client;
    }

    /** $column.columnComment */
    private Long id;

    /** 设备编号 */
    @Excel(name = "设备编号")
    private String clientNo;

    /** 单位ID */
    @Excel(name = "单位ID")
    private Long deptId;

    /** 通道类型 */
    @Excel(name = "通道类型")
    private Long channel;

    /** 事件类型 */
    @Excel(name = "事件类型")
    private String eventType;

    /** 报警值 */
    @Excel(name = "报警值")
    private Float alertValue;

    /** 原始事件id */
    @Excel(name = "原始事件id")
    private String originEventId;

    /** 报警数据 */
    @Excel(name = "报警数据")
    private String originData;

    /** 报警时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "报警时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date eventTime;

    /** 报警日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "报警日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date eventDate;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setClientNo(String clientNo) 
    {
        this.clientNo = clientNo;
    }

    public String getClientNo() 
    {
        return clientNo;
    }
    public void setDeptId(Long deptId) 
    {
        this.deptId = deptId;
    }

    public Long getDeptId() 
    {
        return deptId;
    }
    public void setChannel(Long channel) 
    {
        this.channel = channel;
    }

    public Long getChannel() 
    {
        return channel;
    }
    public void setEventType(String eventType) 
    {
        this.eventType = eventType;
    }

    public String getEventType() 
    {
        return eventType;
    }
    public void setAlertValue(Float alertValue)
    {
        this.alertValue = alertValue;
    }

    public Float getAlertValue()
    {
        return alertValue;
    }
    public void setOriginEventId(String originEventId) 
    {
        this.originEventId = originEventId;
    }

    public String getOriginEventId() 
    {
        return originEventId;
    }
    public void setOriginData(String originData) 
    {
        this.originData = originData;
    }

    public String getOriginData() 
    {
        return originData;
    }
    public void setEventTime(Date eventTime) 
    {
        this.eventTime = eventTime;
    }

    public Date getEventTime() 
    {
        return eventTime;
    }

    public Date getEventDate() {
        return eventDate;
    }

    public void setEventDate(Date eventDate) {
        this.eventDate = eventDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("clientNo", getClientNo())
            .append("deptId", getDeptId())
            .append("channel", getChannel())
            .append("eventType", getEventType())
            .append("alertValue", getAlertValue())
            .append("originEventId", getOriginEventId())
            .append("originData", getOriginData())
            .append("eventTime", getEventTime())
            .append("eventDate", getEventDate())
            .append("remark", getRemark())
            .toString();
    }
}
